package org.serverct.finalfight.game.uhc.team;

import org.bukkit.ChatColor;
import org.serverct.finalfight.util.CustomSettings;

public enum TeamType {
    NULL(ChatColor.WHITE),
    DARK_BLUE(ChatColor.DARK_BLUE),
    DARK_GREEN(ChatColor.DARK_GREEN),
    LAKE_BLUE(ChatColor.DARK_AQUA),
    DARK_RED(ChatColor.DARK_RED),
    PURPLE(ChatColor.DARK_PURPLE),
    GOLD(ChatColor.GOLD),
    GRAY(ChatColor.GRAY),
    DARK_GRAY(ChatColor.DARK_GRAY),
    BLUE(ChatColor.BLUE),
    GREEN(ChatColor.GREEN),
    SKY_BLUE(ChatColor.AQUA),
    RED(ChatColor.RED),
    PINK(ChatColor.LIGHT_PURPLE),
    YELLOW(ChatColor.YELLOW),
    WHITE(ChatColor.WHITE);
    String name;
    String color;
    ChatColor chatColor;
    TeamType(ChatColor color){
        this.chatColor=color;
        this.name= CustomSettings.getLanguageWithoutPrefix("team_"+this.name()+".name");
        this.color= CustomSettings.getLanguageWithoutPrefix("team_"+this.name()+".color");
    }
    public String getName(){
        return this.name;
    }
    public String getColor(){
        return this.color;
    }
    public ChatColor getChatColor(){
        return this.chatColor;
    }
    public String getColoredName(){
        return this.name+this.color;
    }
    public TeamType next(){
        switch (this){
            case DARK_BLUE:
                return DARK_GREEN;
            case DARK_GREEN:
                return LAKE_BLUE;
            case LAKE_BLUE:
                return DARK_RED;
            case DARK_RED:
                return PURPLE;
            case PURPLE:
                return GOLD;
            case GOLD:
                return GRAY;
            case GRAY:
                return DARK_GRAY;
            case DARK_GRAY:
                return BLUE;
            case BLUE:
                return GREEN;
            case GREEN:
                return SKY_BLUE;
            case SKY_BLUE:
                return RED;
            case RED:
                return PINK;
            case PINK:
                return YELLOW;
            case YELLOW:
                return WHITE;
            case WHITE:
                return DARK_BLUE;
        }
        return NULL;
    }
}
